<template>
  <div class="app-container">
    <el-row>
      <el-form :inline="true" :model="searchData">
        <el-form-item label="社会信用代码">
          <el-input
            placeholder="请输入社会信用代码"
            v-model="searchData.creditNo"
          />
        </el-form-item>
        <el-form-item label="公司名称">
          <el-input placeholder="公司名称" v-model="searchData.name" />
        </el-form-item>
        <el-form-item>
          <el-button size="mini" type="primary" @click="toQuery"
            >搜索</el-button
          >
        </el-form-item>
      </el-form>
    </el-row>
    <div>
      <el-table :data="tableData" style="width: 100%">
        <el-table-column
          prop="regNo"
          label="注册号"
          width="170"
        ></el-table-column>
        <el-table-column
          prop="creditNo"
          label="社会信用代码"
          width="180"
        ></el-table-column>
        <el-table-column
          prop="orgNo"
          label="组织机构代码"
          width="110"
        ></el-table-column>
        <el-table-column prop="name" label="公司名称" width="180">
          <el-popover
            slot-scope="scope"
            v-if="scope.row.name"
            placement="top-start"
            title="公司名称"
            width="200"
            trigger="hover"
            :content="scope.row.name"
          >
            <div
              style="
                height: 20px;
                width: 100%;
                overflow: hidden;
                white-space: nowrap;
                text-overflow: ellipsis;
              "
              slot="reference"
            >
              {{ scope.row.name }}
            </div>
          </el-popover>
        </el-table-column>
        <el-table-column prop="category" label="企业/个体户" width="100">
          <div slot-scope="scope" v-if="scope.row.category == 'p'">个体户</div>
          <div v-else>企业</div>
        </el-table-column>
        <el-table-column prop="econKind" label="企业类型" width="180">
          <el-popover
            slot-scope="scope"
            v-if="scope.row.econKind"
            placement="top-start"
            title="企业类型"
            width="200"
            trigger="hover"
            :content="scope.row.econKind"
          >
            <div
              style="
                height: 20px;
                width: 100%;
                overflow: hidden;
                white-space: nowrap;
                text-overflow: ellipsis;
              "
              slot="reference"
            >
              {{ scope.row.econKind }}
            </div>
          </el-popover>
        </el-table-column>
        <el-table-column
          prop="registCapi"
          label="注册资本"
          width="100"
        ></el-table-column>
        <el-table-column
          prop="actualCapi"
          label="实收资金"
          width="100"
        ></el-table-column>
        <el-table-column prop="scope" label="经营范围" width="180">
          <el-popover
            slot-scope="scope"
            v-if="scope.row.scope"
            placement="top-start"
            title="企业类型"
            width="200"
            trigger="hover"
            :content="scope.row.scope"
          >
            <div
              style="
                height: 20px;
                width: 100%;
                overflow: hidden;
                white-space: nowrap;
                text-overflow: ellipsis;
              "
              slot="reference"
            >
              {{ scope.row.scope }}
            </div>
          </el-popover>
        </el-table-column>
        <el-table-column
          prop="termStart"
          label="经营期限起始日期"
          width="180"
        ></el-table-column>
        <el-table-column
          prop="termEnd"
          label="经营期限结束日期"
          width="180"
        ></el-table-column>
        <el-table-column
          prop="checkDate"
          label="核准日期"
          width="100"
        ></el-table-column>
        <el-table-column
          prop="belongOrg"
          label="登记机关"
          width="180"
        ></el-table-column>
        <el-table-column
          prop="operName"
          label="法定代表人"
          width="90"
        ></el-table-column>
        <el-table-column prop="operType" label="法定代表人类型" width="120">
          <div slot-scope="scope" v-if="scope.row.operType == 'P'">个人</div>
          <div v-else>企业</div>
        </el-table-column>
        <el-table-column
          prop="operNameId"
          label="法定代表人ID"
          width="180"
        ></el-table-column>
        <el-table-column
          prop="startDate"
          label="成立日期"
          width="100"
        ></el-table-column>
        <el-table-column
          prop="status"
          label="状态"
          width="60"
        ></el-table-column>
        <el-table-column prop="type" label="类别" width="100">
          <div slot-scope="scope" v-if="scope.row.type == '0'">企业</div>
          <div v-else-if="scope.row.type == '4'">社团</div>
          <div v-else-if="scope.row.type == '5'">律所</div>
          <div v-else-if="scope.row.type == '6'">香港公司</div>
        </el-table-column>
        <el-table-column
          prop="title"
          label="公司代表人职务"
          width="140"
        ></el-table-column>
        <el-table-column
          prop="colleguesNum"
          label="从业人数"
          width="80"
        ></el-table-column>
        <el-table-column
          prop="econType"
          label="社会组织类型"
          width="180"
        ></el-table-column>
        <el-table-column
          prop="department"
          label="社会组织业务主管单位"
          width="180"
        >
          <el-popover
            slot-scope="scope"
            v-if="scope.row.department"
            placement="top-start"
            title="企业类型"
            width="200"
            trigger="hover"
            :content="scope.row.department"
          >
            <div
              style="
                height: 20px;
                width: 100%;
                overflow: hidden;
                white-space: nowrap;
                text-overflow: ellipsis;
              "
              slot="reference"
            >
              {{ scope.row.department }}
            </div>
          </el-popover>
        </el-table-column>
        <el-table-column
          prop="url"
          label="工商快照信息url"
          width="180"
        ></el-table-column>
        <el-table-column
          prop="rowUpdateTime"
          label="变更时间"
          width="180"
        ></el-table-column>
        <el-table-column
          prop="provinceCode"
          label="省份代码（新）"
          width="120"
        ></el-table-column>
        <el-table-column
          prop="districtCode"
          label="最优区域码"
          width="100"
        ></el-table-column>
        <el-table-column prop="titleCode" label="代表人类型代码" width="180">
          <div slot-scope="scope" v-if="scope.row.titleCode == '999A'">
            法定代表人
          </div>
          <div v-else-if="scope.row.titleCode == '490A'">负责人</div>
          <div v-else-if="scope.row.titleCode == '999C'">投资人</div>
          <div v-else-if="scope.row.titleCode == '999D'">经营者</div>
          <div v-else-if="scope.row.titleCode == '921A'">执行事务合伙人</div>
          <div v-else-if="scope.row.titleCode == '491A'">首席代表</div>
          <div v-else-if="scope.row.titleCode == '405A'">理事长</div>
        </el-table-column>
        <el-table-column
          prop="econKindCode"
          label="企业类型代码"
          width="120"
        ></el-table-column>
        <el-table-column prop="registCapiNew" label="注册资本(新)" width="120">
          <div slot-scope="scope">{{ scope.row.registCapiNew }}万元</div>
        </el-table-column>
        <el-table-column
          prop="currencyUnit"
          label="货币单位"
          width="100"
        ></el-table-column>
        <el-table-column
          prop="revokeReason"
          label="吊销原因"
          width="180"
        ></el-table-column>
        <el-table-column
          prop="revokeDate"
          label="吊销日期"
          width="100"
        ></el-table-column>
        <el-table-column
          prop="logoutReason"
          label="注销原因"
          width="180"
        ></el-table-column>
        <el-table-column
          prop="logoutDate"
          label="注销日期"
          width="100"
        ></el-table-column>
        <el-table-column
          prop="revokedCertificates"
          label="吊销凭证"
          width="180"
        ></el-table-column>
        <el-table-column prop="newStatusCode" label="企业状态码" width="100">
          <div slot-scope="scope" v-if="scope.row.newStatusCode == '1'">
            存续
          </div>
          <div v-else-if="scope.row.newStatusCode == '2'">存续</div>
          <div v-else-if="scope.row.newStatusCode == '3'">吊销</div>
          <div v-else-if="scope.row.newStatusCode == '4'">撤销</div>
          <div v-else-if="scope.row.newStatusCode == '5'">迁出</div>
          <div v-else-if="scope.row.newStatusCode == '6'">设立中</div>
          <div v-else-if="scope.row.newStatusCode == '7'">清算中</div>
          <div v-else-if="scope.row.newStatusCode == '8'">清算中</div>
          <div v-else-if="scope.row.newStatusCode == '9'">清算中</div>
        </el-table-column>
        <el-table-column prop="typeNew" label="企业一级分类（新）" width="180">
          <div slot-scope="scope" v-if="scope.row.typeNew == '01'">
            大陆企业
          </div>
          <div v-else-if="scope.row.typeNew == '02'">社会组织</div>
          <div v-else-if="scope.row.typeNew == '03'">机关及事业单位</div>
          <div v-else-if="scope.row.typeNew == '04'">港澳台及国外企业</div>
          <div v-else-if="scope.row.typeNew == '05'">律所等其他组织机构</div>
        </el-table-column>
        <el-table-column
          prop="categoryNew"
          label="企业二级分类（新）"
          width="180"
        >
          <div slot-scope="scope" v-if="scope.row.categoryNew == '0115601'">
            企业
          </div>
          <div v-else-if="scope.row.categoryNew == '0115602'">个体</div>
          <div v-else-if="scope.row.categoryNew == '0115603'">
            农民专业合作社
          </div>
          <div v-else-if="scope.row.categoryNew == '0115699'">其他类型</div>
          <div v-else-if="scope.row.categoryNew == '0215601'">社会团体</div>
          <div v-else-if="scope.row.categoryNew == '0215602'">基金会</div>
          <div v-else-if="scope.row.categoryNew == '0215603'">
            民办非企业单位
          </div>
          <div v-else-if="scope.row.categoryNew == '0215604'">
            村民/居民委员会
          </div>
          <div v-else-if="scope.row.categoryNew == '0215605'">
            宗教，工会等其他社会组织
          </div>
          <div v-else-if="scope.row.categoryNew == '0315601'">事业单位</div>
          <div v-else-if="scope.row.categoryNew == '0315602'">机关</div>
          <div v-else-if="scope.row.categoryNew == '0315603'">其他机构编制</div>
          <div v-else-if="scope.row.categoryNew == '0434401'">香港企业</div>
          <div v-else-if="scope.row.categoryNew == '0444602'">澳门企业</div>
          <div v-else-if="scope.row.categoryNew == '0415803'">台湾企业</div>
          <div v-else-if="scope.row.categoryNew == '0499904'">国外企业</div>
          <div v-else-if="scope.row.categoryNew == '0515601'">律所</div>
          <div v-else-if="scope.row.categoryNew == '0500099'">其他组织机构</div>
        </el-table-column>
        <el-table-column width="250" label="操作">
          <template slot-scope="scope">
            <el-button
              size="mini"
              type="primary"
              icon="el-icon-edit"
              @click="handleEdit(scope.row)"
            ></el-button>
            <el-button
              size="mini"
              type="primary"
              icon="el-icon-phone"
              @click="handlePhone(scope.row)"
            ></el-button>
            <el-button
              size="mini"
              type="primary"
              icon="el-icon-goods"
              @click="handleRemark(scope.row)"
            ></el-button>
            <el-button
              size="mini"
              type="danger"
              icon="el-icon-goods"
              @click="handlePlan(scope.row)"
            ></el-button>
          </template>
        </el-table-column>
      </el-table>
      <el-footer>
        <el-pagination
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
          :current-page="this.pageNum.currentPage"
          :page-sizes="[10, 20, 30, 50]"
          :page-size="this.pageNum.perPage_size"
          layout="total, sizes, prev, pager, next, jumper"
          :total="this.pageNum.total"
        >
        </el-pagination>
      </el-footer>
      <el-dialog title="详情" :visible.sync="dialogVisible" width="65%">
        <el-tabs v-model="activeName" @tab-click="handleClick">
          <el-tab-pane label="企业地址（工商公示）" name="first">
            <div>
              <el-table :data="tableAddressData" style="width: 100%">
                <el-table-column prop="address" label="地址" width="180">
                  <el-popover
                    slot-scope="scope"
                    v-if="scope.row.address"
                    placement="top-start"
                    title="地址"
                    width="200"
                    trigger="hover"
                    :content="scope.row.address"
                  >
                    <div
                      style="
                        height: 20px;
                        width: 100%;
                        overflow: hidden;
                        white-space: nowrap;
                        text-overflow: ellipsis;
                      "
                      slot="reference"
                    >
                      {{ scope.row.address }}
                    </div>
                  </el-popover>
                </el-table-column>
                <el-table-column prop="name" label="地址获取描述" width="120">
                </el-table-column>
                <el-table-column prop="postcode" label="邮编" width="70">
                </el-table-column>
                <el-table-column prop="date" label="获取日期" width="100">
                </el-table-column>
                <el-table-column prop="source" label="地址获取来源" width="120">
                </el-table-column>
                <el-table-column prop="checkDate" label="核准日期" width="100">
                </el-table-column>
                <el-table-column prop="updateDate" label="更新日期" width="180">
                </el-table-column>
                <el-table-column
                  prop="addressCode"
                  label="地址区域代码"
                  width="120"
                >
                </el-table-column>
              </el-table>
            </div>
          </el-tab-pane>
          <el-tab-pane label="企业分支机构" name="second">
            <div>
              <el-table :data="tableBranchesData" style="width: 100%">
                <el-table-column prop="name" label="分支机构名称" width="180">
                  <el-popover
                    slot-scope="scope"
                    v-if="scope.row.name"
                    placement="top-start"
                    title="地址"
                    width="200"
                    trigger="hover"
                    :content="scope.row.name"
                  >
                    <div
                      style="
                        height: 20px;
                        width: 100%;
                        overflow: hidden;
                        white-space: nowrap;
                        text-overflow: ellipsis;
                      "
                      slot="reference"
                    >
                      {{ scope.row.name }}
                    </div>
                  </el-popover>
                </el-table-column>
                <el-table-column
                  prop="belong_org"
                  label="所属机构"
                  width="180"
                ></el-table-column>
                <el-table-column
                  prop="operName"
                  label="法人代表"
                  width="80"
                ></el-table-column>
                <el-table-column
                  prop="regNo"
                  label="注册号"
                  width="180"
                ></el-table-column>
              </el-table>
            </div>
          </el-tab-pane>
          <el-tab-pane label="企业变更记录（工商公示）" name="third">
            <el-table :data="tableChangeRecordsData" style="width: 100%">
              <el-table-column
                prop="afterContent"
                label="变更后内容"
                width="180"
              >
                <el-popover
                  slot-scope="scope"
                  v-if="scope.row.afterContent"
                  placement="top-start"
                  title="变更后内容"
                  width="200"
                  trigger="hover"
                  :content="scope.row.afterContent"
                >
                  <div
                    style="
                      height: 20px;
                      width: 100%;
                      overflow: hidden;
                      white-space: nowrap;
                      text-overflow: ellipsis;
                    "
                    slot="reference"
                  >
                    {{ scope.row.afterContent }}
                  </div>
                </el-popover>
              </el-table-column>
              <el-table-column
                prop="beforeContent"
                label="变更前内容"
                width="180"
              >
                <el-popover
                  slot-scope="scope"
                  v-if="scope.row.beforeContent"
                  placement="top-start"
                  title="变更前内容"
                  width="200"
                  trigger="hover"
                  :content="scope.row.beforeContent"
                >
                  <div
                    style="
                      height: 20px;
                      width: 100%;
                      overflow: hidden;
                      white-space: nowrap;
                      text-overflow: ellipsis;
                    "
                    slot="reference"
                  >
                    {{ scope.row.beforeContent }}
                  </div>
                </el-popover>
              </el-table-column>
              <el-table-column
                prop="changeDate"
                label="变更日期"
                width="100"
              ></el-table-column>
              <el-table-column
                prop="changeItem"
                label="变更名称"
                width="140"
              ></el-table-column>
              <el-table-column
                prop="type"
                label="变更分类"
                width="140"
              ></el-table-column>
              <el-table-column prop="uTags" label="隐藏标记" width="100">
                <div slot-scope="scope" v-if="scope.row.uTags == '0'">正常</div>
                <div v-else-if="scope.row.uTags == '1'">历史信息</div>
                <div v-else-if="scope.row.uTags == '2'">用户投诉</div>
              </el-table-column>
            </el-table>
          </el-tab-pane>

          <el-tab-pane label="企业邮箱（工商公示）" name="fourth">
            <el-table :data="tableEmailsData" style="width: 100%">
              <el-table-column
                prop="name"
                label="邮箱获取描述"
                width="120"
              ></el-table-column>
              <el-table-column prop="value" label="公司邮箱" width="100">
                <el-popover
                  slot-scope="scope"
                  v-if="scope.row.value"
                  placement="top-start"
                  title="公司邮箱"
                  width="200"
                  trigger="hover"
                  :content="scope.row.value"
                >
                  <div
                    style="
                      height: 20px;
                      width: 100%;
                      overflow: hidden;
                      white-space: nowrap;
                      text-overflow: ellipsis;
                    "
                    slot="reference"
                  >
                    {{ scope.row.value }}
                  </div>
                </el-popover>
              </el-table-column>
              <el-table-column
                prop="date"
                label="获取日期"
                width="100"
              ></el-table-column>
              <el-table-column
                prop="source"
                label="来源"
                width="80"
              ></el-table-column>
              <el-table-column
                prop="rowUpdateTime"
                label="变更时间"
                width="180"
              ></el-table-column>
              <el-table-column
                prop="uTags"
                label="隐藏标识"
                width="180"
              ></el-table-column>
            </el-table>
          </el-tab-pane>
          <el-tab-pane label="企业主要人员（工商公示）" name="fifth">
            <el-table :data="tableEmployeesData" style="width: 100%">
              <el-table-column
                prop="jobTitle"
                label="职位"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="name"
                label="名称"
                width="120"
              ></el-table-column>
              <el-table-column prop="nameType" label="人员类型" width="120">
                <div slot-scope="scope" v-if="scope.row.nameType == 'P'">
                  正常
                </div>
                <div v-else-if="scope.row.nameType == 'E'">历史信息</div>
              </el-table-column>
              <el-table-column
                prop="namePid"
                label="人员id"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="sex"
                label="性别"
                width="120"
              ></el-table-column>
            </el-table>
          </el-tab-pane>
          <el-tab-pane label="企业股东信息（工商公示）" name="sixth">
            <el-table :data="tablePartnersData" style="width: 100%">
              <el-table-column
                prop="stockName"
                label="股东名称"
                width="100"
              ></el-table-column>
              <el-table-column
                prop="stockType"
                label="股东类型"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="stockPercent"
                label="股东出资比例"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="identifyType"
                label="证件类型"
                width="100"
              ></el-table-column>
              <el-table-column
                prop="identifyNo"
                label="企业证照号"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="totalRealCapi"
                label="股东总实缴"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="totalShouldCapi"
                label="股东总认缴"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="shouldCapiItems"
                label="认缴明细"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="realCapiItems"
                label="实缴明细"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="country"
                label="国家,地区"
                width="120"
              ></el-table-column>
            </el-table>
          </el-tab-pane>
          <el-tab-pane label="企业社保信息（工商年报公示）" name="seventh">
            <el-table :data="tableSocialSecurityData" style="width: 100%">
              <el-table-column prop="name" label="公司名" width="180">
                <el-popover
                  slot-scope="scope"
                  v-if="scope.row.name"
                  placement="top-start"
                  title="公司邮箱"
                  width="200"
                  trigger="hover"
                  :content="scope.row.name"
                >
                  <div
                    style="
                      height: 20px;
                      width: 100%;
                      overflow: hidden;
                      white-space: nowrap;
                      text-overflow: ellipsis;
                    "
                    slot="reference"
                  >
                    {{ scope.row.name }}
                  </div>
                </el-popover>
              </el-table-column>
              <el-table-column
                prop="reportYear"
                label="年报年份"
                width="100"
              ></el-table-column>
              <el-table-column
                prop="reportName"
                label="年报名称"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="reportDate"
                label="年报日期"
                width="100"
              ></el-table-column>
              <el-table-column
                prop="bqShengyubxJe"
                label="参加生育保险本期实际缴费金额"
                width="100"
              ></el-table-column>
              <el-table-column
                prop="dwJeDisplay"
                label="是否展示欠缴金额"
                width="100"
              ></el-table-column>
              <el-table-column
                prop="dwYanglaobxJe"
                label="单位参加城镇职工基本养老保险累计欠缴金额"
                width="100"
              ></el-table-column>
              <el-table-column
                prop="bqShiyebxJe"
                label="参加失业保险本期实际缴费金额"
                width="100"
              ></el-table-column>
              <el-table-column
                prop="dwYiliaobxJe"
                label="单位参加职工基本医疗保险累计欠缴金额"
                width="100"
              ></el-table-column>
              <el-table-column
                prop="shiyebxNum"
                label="失业保险人数"
                width="100"
              ></el-table-column>
              <el-table-column
                prop="dwYanglaobxJs"
                label="单位参加城镇职工基本养老保险缴费基数"
                width="100"
              ></el-table-column>
              <el-table-column
                prop="dwGongshangbxJs"
                label="单位参加工伤保险缴费基数"
                width="100"
              ></el-table-column>
              <el-table-column
                prop="yiliaobxNum"
                label="职工基本医疗保险人数"
                width="100"
              ></el-table-column>
              <el-table-column
                prop="dwShengyubxJe"
                label="单位参加生育保险累计欠缴金额"
                width="100"
              ></el-table-column>
              <el-table-column
                prop="dwJsDisplay"
                label="是否展示单位缴费基数"
                width="100"
              ></el-table-column>
              <el-table-column
                prop="dwShengyubxJs"
                label="单位参加生育保险缴费基数"
                width="100"
              ></el-table-column>
              <el-table-column
                prop="bqYiliaobxJe"
                label="参加职工基本医疗保险本期实际缴费金额"
                width="100"
              ></el-table-column>
              <el-table-column
                prop="bqGongshangbxJe"
                label="参加工伤保险本期实际缴费金额"
                width="100"
              ></el-table-column>
              <el-table-column
                prop="dwGongshangbxJe"
                label="单位参加工伤保险累计欠缴金额"
                width="100"
              ></el-table-column>
              <el-table-column
                prop="shengyubxNum"
                label="生育保险人数"
                width="100"
              ></el-table-column>
              <el-table-column
                prop="dwShiyebxJs"
                label="单位参加失业保险缴费基数"
                width="100"
              ></el-table-column>
              <el-table-column
                prop="dwShiyebxJe"
                label="单位参加失业保险累计欠缴金额"
                width="100"
              ></el-table-column>
              <el-table-column
                prop="bqJeDisplay"
                label="是否展示实际缴费金额"
                width="100"
              ></el-table-column>
              <el-table-column
                prop="gongshangbxNum"
                label="工伤保险人数"
                width="100"
              ></el-table-column>
              <el-table-column
                prop="yanglaobxNum"
                label="城镇职工基本养老保险人数"
                width="100"
              ></el-table-column>
              <el-table-column
                prop="bqYanglaobxJe"
                label="参加城镇职工基本养老保险本期实际缴费金额"
                width="100"
              ></el-table-column>
              <el-table-column
                prop="dwYiliaobxJs"
                label="单位参加职工基本医疗保险缴费基数"
                width="100"
              ></el-table-column>
              <el-table-column
                prop="currency"
                label="币种"
                width="80"
              ></el-table-column>
            </el-table>
          </el-tab-pane>
          <el-tab-pane label="企业电话（工商公示）" name="eighth">
            <el-table :data="tableTelephonesData" style="width: 100%">
              <el-table-column
                prop="name"
                label="电话获取描述"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="value"
                label="公司电话"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="date"
                label="获取日期"
                width="120"
              ></el-table-column>
            </el-table>
          </el-tab-pane>
          <el-tab-pane label="企业网址（工商公示）" name="ninth">
            <el-table :data="tableWebsitesData" style="width: 100%">
              <el-table-column
                prop="webType"
                label="网址类型"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="webName"
                label="网址名称"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="webUrl"
                label="网址"
                width="120"
              ></el-table-column>
            </el-table>
          </el-tab-pane>
          <el-tab-pane label="企业年报（工商公示）" name="tenth">
            <el-table :data="tableReportDetailsData" style="width: 100%">
              <el-table-column
                prop="reportYear"
                label="年报年份"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="regNo"
                label="注册号"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="creditNo"
                label="社会信用代码"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="name"
                label="企业名称"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="reportName"
                label="年报名称"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="reportDate"
                label="年报日期"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="netAmount"
                label="净利润"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="debitAmount"
                label="负债总额"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="pracPersonNum"
                label="实际员工数量"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="telephone"
                label="公司电话"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="email"
                label="公司电子邮箱"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="saleIncome"
                label="销售总额"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="profitTotal"
                label="利润总额"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="profitReta"
                label="所有者权益合计"
                width="180"
              ></el-table-column>
              <el-table-column
                prop="taxTotal"
                label="纳税总额"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="totalEquity"
                label="资产总额"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="address"
                label="地址"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="fareScope"
                label="主营业务"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="operName"
                label="法定代表人"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="zipCode"
                label="邮编"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="servFare_income"
                label="主营业务收入"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="reg_capi"
                label="注册资本"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="indivFormMode"
                label="江苏地方年报中的法定代表人字段"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="colleguesNum"
                label="从业人数"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="ifWebsite"
                label="是否有网站或网店"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="ifInvest"
                label="企业是否有投资信息或购买其他公司股权"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="ifExternalGuarantee"
                label="是否提供对外担保"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="ifEquity"
                label="是否发生股东股权转让"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="createDate"
                label="创建时间"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="status"
                label="企业经营状态"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="fax"
                label="传真"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="guaranteeItems"
                label="年报担保信息"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="investItems"
                label="年报投资信息"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="websites"
                label="年报网站信息"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="externalGuarantees"
                label="年报对外担保信息"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="registCapiInfo"
                label="年报注册资本实缴情况"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="changeRecords"
                label="年报变更记录"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="branch"
                label="年报分支机构"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="stockChanges"
                label="年报股东变更"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="investSituation"
                label="年报出资情况信息"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="matterRecord"
                label="年报备案信息"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="updateRecords"
                label="年报修改记录"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="partners"
                label="年报股东信息"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="telTags"
                label="年报中电话号码隐藏标志"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="emailTags"
                label="年报中邮箱隐藏标志"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="changeTags"
                label="年报修改记录隐藏标志"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="femaleColleguesNum"
                label="其中女性从业人数"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="enterpriseHoldingSituation"
                label="企业控股情况"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="supEname"
                label="隶属企业名称"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="supCreditNo"
                label="隶属企业统一社会信用代码/注册号"
                width="120"
              ></el-table-column>
            </el-table>
          </el-tab-pane>
          <el-tab-pane label="新表-企业对外投资" name="eleventh">
            <el-table :data="tableEnterpriseInvestmentData" style="width: 100%">
              <el-table-column
                prop="name"
                label="公司名称"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="investEid"
                label="被投资公司id"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="stockPercent"
                label="股比"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="shouldCapiConv"
                label="应缴额（转换为万元人民币的）"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="investName"
                label="被投资公司名称"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="investCreditNo"
                label="被投资公司统一社会信用代码"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="investRegNo"
                label="被投资公司注册号"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="investStatus"
                label="被投资公司状态"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="investOperName"
                label="被投资公司法定代表人"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="investRegistCapi"
                label="被投资公司注册资本"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="investStartDate"
                label="被投资公司创立日期"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="belongOrg"
                label="被投资公司登记机关"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="belongOrgCode"
                label="被投资公司登记机关区域代码"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="investStatusCode"
                label="被投资公司企业状态代码"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="stockNum"
                label="在被投资公司的持股数"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="investQuoteStatus"
                label="被投资公司上市状态"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="shouldCapi"
                label="数据源原始认缴额(单位未转换)"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="currencyCode"
                label="货币代码"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="realCapi"
                label="实缴额"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="shouldConDate"
                label="应缴出资日期"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="createTime"
                label="创建时间"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="isHistory"
                label="是否历史"
                width="120"
              ></el-table-column>
            </el-table>
          </el-tab-pane>
          <el-tab-pane label="企业最新行业信息表" name="twelfth">
            <el-table :data="tableLastIndustryData" style="width: 100%">
              <el-table-column
                prop="industrycode"
                label="行业代码"
                width="120"
              ></el-table-column>
              <el-table-column
                prop="startDate"
                label="纳入时间"
                width="120"
              ></el-table-column>
            </el-table>
          </el-tab-pane>
        </el-tabs>
        <!-- <span slot="footer" class="dialog-footer">
          <el-button @click="dialogVisible = false">取 消</el-button>
          <el-button type="primary" @click="dialogVisible = false"
            >确 定</el-button
          >
        </span> -->
      </el-dialog>
      <el-dialog title="电话" :visible.sync="dialogVisiblePhone" width="65%">
        <el-table :data="tablePhonesData" style="width: 100%">
          <el-table-column
            prop="name"
            label="电话获取描述"
            width="120"
          ></el-table-column>
          <el-table-column
            prop="value"
            label="公司电话"
            width="120"
          ></el-table-column>
          <el-table-column
            prop="date"
            label="获取日期"
            width="120"
          ></el-table-column>
        </el-table>
      </el-dialog>
      <el-dialog title="营销备注" :visible.sync="dialogVisibleRemark" width="65%">
        <el-form
          label-position="right"
          label-width="80px"
          :model="formLabelAlign"
        >
          <el-form-item label="营销产品">
            <el-input v-model="formLabelAlign.product"></el-input>
          </el-form-item>
                    <el-form-item label="沟通记录">
            <el-input v-model="formLabelAlign.record"></el-input>
          </el-form-item>
        </el-form>
      </el-dialog>
      <el-dialog title="走访计划" :visible.sync="dialogVisiblePlan" width="65%">
      <el-form
          label-position="left"
          label-width="100px"
          :model="addData"
          ref="dataForm"
          class="dataForm"
      >
        <el-form-item label="客户名称" prop="customName">
          <el-input v-model="addData.customName" placeholder="客户名称"></el-input>
        </el-form-item>
        <el-form-item label="计划日期" prop="planAccTime">
          <div class="datePicker">
            <el-date-picker
              v-model="addData.planAccTime"
              type="date"
              class="datepicker"
              placeholder="计划日期"
              value-format="yyyy-MM-dd">
          </el-date-picker>
          </div>
        </el-form-item>
        <el-form-item label="客户地址" prop="customAddress">
          <el-input
              type="textarea"
              placeholder="客户地址"
              v-model="addData.customAddress"
              maxlength="100"
              show-word-limit
          />
        </el-form-item>
      </el-form>
      <span slot="footer">
        <el-button @click="addDialogVisible = false">取 消</el-button>
        <el-button type="primary" @click="handleAddSubmit">确 定</el-button>
      </span>
      </el-dialog>
    </div>
  </div>
</template>

<script>
import axios from "../../utils/axios";
export default {
  data() {
    return {
      tableData: [],
      pageNum: { current: 1, size: 10, total: 0 },
      dialogVisible: false,
      dialogVisiblePhone: false,
      dialogVisibleRemark: false,
      dialogVisiblePlan: false,
      activeName: "first",
      tableAddressData: [],
      tableBranchesData: [],
      tableChangeRecordsData: [],
      tableEmailsData: [],
      tableEmployeesData: [],
      tablePartnersData: [],
      tableSocialSecurityData: [],
      tableTelephonesData: [],
      tableWebsitesData: [],
      tableReportDetailsData: [],
      tableEnterpriseInvestmentData: [],
      tableLastIndustryData: [],
      searchData: {
        eid: "",
        id: "",
        regNo: "",
        creditNo: "",
        orgNo: "",
        name: "",
        formatName: "",
        category: "",
        province: "",
        econKind: "",
        registCapi: "",
        actualCapi: "",
        scope: "",
        termStart: "",
        termEnd: "",
        checkDate: "",
        belongOrg: "",
        operName: "",
        operType: "",
        operNameId: "",
        startDate: "",
        endDate: "",
        status: "",
        address: "",
        type: "",
        typeDesc: "",
        title: "",
        longitude: "",
        latitude: "",
        gdLongitude: "",
        gdLatitude: "",
        objId: "",
        source: "",
        taxNo: "",
        colleguesNum: "",
        description: "",
        createdTime: "",
        lastUpdateTime: "",
        logoUrl: "",
        statusCode: "",
        econType: "",
        department: "",
        url: "",
        orgType: "",
        rowUpdateTime: "",
        provinceCode: "",
        districtCode: "",
        titleCode: "",
        econKindCode: "",
        registCapiNew: "",
        currencyUnit: "",
        belongOrgCode: "",
        creditAreaCode: "",
        revokeReason: "",
        revokeDate: "",
        logoutReason: "",
        logoutDate: "",
        groupName: "",
        groupAbbreviation: "",
        revokedCertificates: "",
        newStatusCode: "",
        typeNew: "",
        categoryNew: "",
        localRowUpdateTime: "",
      },
      tablePhonesData: [],
      formLabelAlign:{
         product: '',
         record:''
      },
      addData:{
        customName:'',
        planAccTime:'',
        customAddress:''
      },
    };
  },
  created() {
    this.toQuery();
  },
  methods: {
    toQuery() {
      axios({
        method: "GET",
        url: "/tEnterprise/getEnterprise",
        params: this.searchData,
      }).then((res) => {
        console.log("res.data");
        console.log(res);
        this.tableData = res.data.records;
        this.pageNum.current = res.data.current;
        this.pageNum.size = res.data.size;
        this.pageNum.total = res.data.total;
      });
    },
    handleSizeChange(val) {
      console.log("handleSizeChange");
      console.log(val);
      this.pageNum.size = val;
      this.searchData.current = this.pageNum.current;
      this.searchData.size = this.pageNum.size;
      this.query(this.searchData);
    },
    handleCurrentChange(val) {
      console.log("handleCurrentChange");
      console.log(val);
      this.pageNum.current = val;
      this.searchData.current = this.pageNum.current;
      this.searchData.size = this.pageNum.size;
      this.query(this.searchData);
    },
    query(val) {
      console.log("BABABABBABA");
      console.log(val);
      axios({
        method: "GET",
        url: "/tEnterprise/getEnterprise",
        params: val,
      }).then((res) => {
        console.log("res.data111");
        console.log(res);
        this.tableData = res.data.records;
        this.tableData = res.data.records;
        this.pageNum.current = res.data.current;
        this.pageNum.size = res.data.size;
        this.pageNum.total = res.data.total;
      });
    },
    handleClose() {
      // this.$confirm("确认关闭？")
      //   .then((res) => {
      //     console.log(res);
      //     done();
      //   })
      //   .catch((res) => {
      //     console.log(res);
      //   });
    },
    handleClick(tab, event) {
      console.log(tab, event);
    },
    handleEdit(val) {
      this.dialogVisible = true;
      console.log(val);
      axios({
        method: "GET",
        url: "/tAddress/findByEid/" + val.eid,
      })
        .then((res) => {
          console.log("tableAddressData");
          console.log(res);
          this.tableAddressData = res;
        })
        .catch((res) => {
          console.log(res);
        });
      axios({
        method: "GET",
        url: "/tBranches/findByEid/" + val.eid,
      })
        .then((res) => {
          console.log("tableBranchesData");
          console.log(res);
          this.tableBranchesData = res;
        })
        .catch((res) => {
          console.log(res);
        });
      axios({
        method: "GET",
        url: "/tChangeRecords/findByEid/" + val.eid,
      })
        .then((res) => {
          console.log("tableChangeRecordsData");
          console.log(res);
          this.tableChangeRecordsData = res;
        })
        .catch((res) => {
          console.log(res);
        });
      axios({
        method: "GET",
        url: "/tEmails/findByEid/" + val.eid,
      })
        .then((res) => {
          console.log("tableEmailsData");
          console.log(res);
          this.tableEmailsData = res;
        })
        .catch((res) => {
          console.log(res);
        });
      axios({
        method: "GET",
        url: "/tEmployees/findByEid/" + val.eid,
      })
        .then((res) => {
          console.log("tableEmployeesData");
          console.log(res);
          this.tableEmployeesData = res;
        })
        .catch((res) => {
          console.log(res);
        });
      axios({
        method: "GET",
        url: "/tPartners/findByEid/" + val.eid,
      })
        .then((res) => {
          console.log("tablePartnersData");
          console.log(res);
          this.tablePartnersData = res;
        })
        .catch((res) => {
          console.log(res);
        });
      axios({
        method: "GET",
        url: "/tSocialSecurity/findByEid/" + val.eid,
      })
        .then((res) => {
          console.log("tableSocialSecurityData");
          console.log(res);
          this.tableSocialSecurityData = res;
        })
        .catch((res) => {
          console.log(res);
        });
      axios({
        method: "GET",
        url: "/tTelephones/findByEid/" + val.eid,
      })
        .then((res) => {
          console.log("tableTelephonesData");
          console.log(res);
          this.tableTelephonesData = res;
        })
        .catch((res) => {
          console.log(res);
        });
      axios({
        method: "GET",
        url: "/tWebsites/findByEid/" + val.eid,
      })
        .then((res) => {
          console.log("tableWebsitesData");
          console.log(res);
          this.tableWebsitesData = res;
        })
        .catch((res) => {
          console.log(res);
        });
      axios({
        method: "GET",
        url: "/tReportDetails/findByEid/" + val.eid,
      })
        .then((res) => {
          console.log("tableReportDetailsData");
          console.log(res);
          this.tableReportDetailsData = res;
        })
        .catch((res) => {
          console.log(res);
        });
      axios({
        method: "GET",
        url: "/tEnterpriseInvestment/findByEid/" + val.eid,
      })
        .then((res) => {
          console.log("tableEnterpriseInvestmentData");
          console.log(res);
          this.tableEnterpriseInvestmentData = res;
        })
        .catch((res) => {
          console.log(res);
        });
      axios({
        method: "GET",
        url: "/tLastIndustry/findByEid/" + val.eid,
      })
        .then((res) => {
          console.log("tableLastIndustryData");
          console.log(res);
          this.tableLastIndustryData = res;
        })
        .catch((res) => {
          console.log(res);
        });
    },
    handlePhone(val) {
      (this.dialogVisiblePhone = true),
        axios({
          method: "GET",
          url: "/tTelephones/findByEid/" + val.eid,
        })
          .then((res) => {
            console.log("tablePhonesData");
            console.log(res);
            this.tablePhonesData = res;
          })
          .catch((res) => {
            console.log(res);
          });
    },
    handleRemark(val) {
      (this.dialogVisibleRemark = true),
        axios({
          method: "GET",
          url: "/tTelephones/findByEid/" + val.eid,
        })
          .then((res) => {
            console.log("tableTelephonesData");
            console.log(res);
            this.tableTelephonesData = res;
          })
          .catch((res) => {
            console.log(res);
          });
    },
    handlePlan(val) {
      (this.dialogVisiblePlan = true),
        axios({
          method: "GET",
          url: "/tTelephones/findByEid/" + val.eid,
        })
          .then((res) => {
            console.log("tableTelephonesData");
            console.log(res);
            this.tableTelephonesData = res;
          })
          .catch((res) => {
            console.log(res);
          });
    },
    addDialogVisible(){
      this.dialogVisiblePlan=false
    },
  },
};
</script>

<style scoped>
 .datePicker{
    margin-right: 420px;      
}
</style>
